from frontend.roleApplication import RoleApplication
from frontend.form import Type
from unique import UNIQUE;

class DeliverApplication(RoleApplication):
    def __init__(self):
        super(DeliverApplication, self).__init__("Foodler"+UNIQUE, "Deliver") 
        self.register_sink_step("DeliverOrder", self.deliver_order, name_fields=["sequence", "CustomerName", "Restaurant", "Food", "Quantity"])

    def deliver_order(self, stepname, form):
        form.add_task_label(fields=["CustomerName","Restaurant","Food","Quantity"]) 

if __name__ == '__main__':
    app = DeliverApplication()
    app.MainLoop()